package com.springapp.tests.mock;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import com.springapp.model.Cathegory;
import com.springapp.model.Desk;
import com.springapp.model.Item;
import com.springapp.model.ItemInOrder;
import com.springapp.model.Order;
import com.springapp.model.OrderStatus;
import com.springapp.model.Role;
import com.springapp.model.Shape;
import com.springapp.model.Status;
import com.springapp.model.User;

public class MockObjects {

    private Cathegory cath;
    private Item item;
    private ItemInOrder itemInOr;
    private Desk desk;
    private Order order;
    private User user;

    public MockObjects() {

        cath = new Cathegory();
        item = new Item();
        itemInOr = new ItemInOrder();
        desk = new Desk();
        order = new Order();
        user = new User();

        cath.setId(4);
        cath.setName("category_name");

        item.setId(3);
        item.setCathegory(cath);
        item.setDescription("category_description");
        item.setPrice(999.99d);
        item.setName("item_name");

        List<Item> items = new ArrayList<Item>();
        items.add(item);

        cath.setItems(items);

        itemInOr.setId(5);
        itemInOr.setQuantity(10L);
        itemInOr.setItem(item);
        itemInOr.setOrder(order);

        desk.setId(2);
        desk.setShape(Shape.circle);
        desk.setPositionX(100);
        desk.setPositionY(200);
        desk.setStatus(Status.FREE);

        order.setId(10);
        order.setDesk(desk);
        order.setStatus(OrderStatus.CLOSED);
        List<ItemInOrder> itemsInOrder = new ArrayList<ItemInOrder>();
        itemsInOrder.add(itemInOr);
        order.setItemsInOrder(itemsInOrder);
        desk.setOrder(order);

        user.setId(7);
        user.setKey("key");
        user.setLogin("login");
        user.setName("user");
        user.setPassword("pass");
        user.setRole(Role.admin);
    }

    public Cathegory getCath() {
        return cath;
    }

    public Item getItem() {
        return item;
    }

    public ItemInOrder getItemInOr() {
        return itemInOr;
    }

    public Desk getDesk() {
        return desk;
    }

    public Order getOrder() {
        return order;
    }

    public User getUser() {
        return user;
    }

    public void setCath(Cathegory cath) {
        this.cath = cath;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    public void setItemInOr(ItemInOrder itemInOr) {
        this.itemInOr = itemInOr;
    }

    public void setDesk(Desk desk) {
        this.desk = desk;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
